package cn.dlc.com.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 这个可以不要，主要是用来启动多个服务的时候检查一下对不对得上
 * @author Administrator
 *
 */
@RestController
@RequestMapping("test")
public class TestController {
	
	@Autowired
	private Environment env;

	@GetMapping("{id}")
	public String test(@PathVariable("id") String id) {
		
		return env.getProperty("server.port") + " : " + id;
	}
}
